﻿<local:DocumentBase x:Class="WPFExcelReport.DSTDYARN"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
        xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
       Height="700" Width="1024" 
       Background="White" 
         Loaded="Window_Loaded"
        Title="DSTDYARN"  
     >
    <local:DocumentBase.Resources>
        <ucd:DD2ColorConverter  x:Key="dd2color"/>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}" Height="625" Width="978">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,0,3,65">            
            <WrapPanel Name="ZoneOrder" Width="969">
                <Label Content="输入花号不带A,B,C或者-1,-2等（例如：D3203）"    Width="390" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTICLE" Width="101" Margin="10,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="1"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="配色从(例如:1,2等)"    Width="167" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCOLOR" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="2" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="到"    Width="26" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCOLORE" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="3"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="2" FontSize="18" Foreground="#FF141111" Height="33" />

                <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnQuery" Click="btnQuery_Click"  KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="10">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <Button   Height="30" Margin="20,0,0,0" Visibility="Hidden" Name="btnPrintPreview" Width="30" Click="btnPrintPreview_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Print.png" />
                    </Button.Background>
                </Button>                
            </WrapPanel>            
        </StackPanel>
        <StackPanel Margin="0,36,3,12" Grid.ColumnSpan="2" Orientation="Vertical" >
            <WrapPanel>
                <Label Content="指定配色"    Width="73" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCOLOR1" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="4"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="2" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR2" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="5"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR3" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="6"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR4" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="7"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR5" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="8"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR6" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="9"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR7" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="10"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR8" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="11"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR9" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="12"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR10" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="13"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR11" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="14"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR12" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="15"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR13" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="16"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR14" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="17"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR15" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="18"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR16" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="19"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR17" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="20"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR18" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="21"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR19" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="22"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBox Name="txtCOLOR20" Width="27" Margin="5,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="23"
                         KeyUp="txtART_KeyUp" Focusable="True" CharacterCasing="Upper" Background="Beige" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                

            </WrapPanel>
        </StackPanel>
        <StackPanel Margin="0,70,3,12" Grid.RowSpan="4" Grid.ColumnSpan="3">            
            <WrapPanel Width="972" Height="575">
                <fd:FilteringDataGrid
                                CanUserReorderColumns="True"  
                                CanUserResizeRows="True" 
                                CanUserSortColumns="True"
                                IsFilteringCaseSensitive="False"
                                AutoGenerateColumns="False"  
                                EnableRowVirtualization="True"  
                                RowDetailsVisibilityMode="VisibleWhenSelected"
                                HorizontalAlignment="Stretch" 
                                VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" 
                                Opacity="10" 
                                Visibility="Visible"
                                ItemsSource="{Binding}" 
                                Margin="10,5,0,0" 
                                x:Name="dlgARTICLE" Height="541" Width="454">
                    <DataGrid.Columns>
                        <!--ARTICLE,ART,FARBE,BEM,REQ,QTY-->
                        <DataGridTextColumn Binding="{Binding Path=ARTICLE}" Header="小花号" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=ART}" Header="纱线编号" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=FARBE}" Header="色号" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=BEM}" Header="颜色" Width="SizeToCells" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=REQ}" Header="花号原纱用量"   FontSize="12" Width="SizeToCells" MinWidth="75"/>
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="花号色纱用量" Width="SizeToCells" FontSize="12"  MinWidth="75" />
                       
                    </DataGrid.Columns>
                </fd:FilteringDataGrid  >
                <fd:FilteringDataGrid
                                CanUserReorderColumns="True"  
                                CanUserResizeRows="True" 
                                CanUserSortColumns="True"
                                IsFilteringCaseSensitive="False"
                                AutoGenerateColumns="False"  
                                EnableRowVirtualization="True"  
                                RowDetailsVisibilityMode="VisibleWhenSelected"
                                HorizontalAlignment="Stretch" 
                                VerticalAlignment="Stretch"
                                IsSynchronizedWithCurrentItem="True" 
                                Opacity="10" 
                                Visibility="Visible"
                                ItemsSource="{Binding}" 
                                Margin="10,5,0,0" 
                                x:Name="dlgDYARN" Height="538" Width="423">
                    <DataGrid.Columns>
                        <!--ART,FARBE,BEM,REQ,QTY-->
                        <DataGridTextColumn Binding="{Binding Path=ART}" Header="纱线编号" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=FARBE}" Header="色号" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=BEM}" Header="颜色" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=REQ}" Header="总原纱KG" Width="SizeToCells" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="总色纱KG" Width="SizeToCells" MinWidth="60" />                        
                    </DataGrid.Columns>
                </fd:FilteringDataGrid  >
            </WrapPanel>
        </StackPanel>
       
    </Grid>
</local:DocumentBase>
